﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace D.B.Data.Infrastructuse
{
    public static class EnumHelp
    {
        public static object GetEnum<T> () where T : Enum
        {
            Dictionary<int,string> dic=new Dictionary<int,string>();

            Type type = typeof (T);
            Array array=Enum.GetValues (type);
            foreach (var item in array)
            {
                int key=Convert.ToInt32(item);
                dic.Add(key, item.ToString());
            }
            return dic.ToList();
        }
    }
}
